//抽离路由
import Router from 'vue-router'
import login       from   '../components/login.vue'
import home        from   '../components/home.vue'
import UserList    from   '../components/admin/UserList.vue'
import MyNote      from    '../components/official/mynote.vue'
import MyTask      from   '../components/official/mytask.vue'
import Archived    from   '../components/official/archived.vue'
import Documents   from   '../components/official/documents.vue'
import Address     from   '../components/personal/address.vue'
import UserRegistry from '../components/personal/registry.vue'
const router  = new Router({
    routes:[
        {path:'/',component:login},
        {path:'/login',component:login},
        {path:'/home',component:home,
        children:[
            {path:'/admin/user/desk',component:UserList},
            {path:'/admin/user/note',component:MyNote},
            {path:'/admin/user/perso',component:MyTask},
            {path:'/admin/user/addr',component:Address},
            {path:'/admin/conf/dept',component:Archived},
            {path:'/admin/ofile/maint',component:Documents}
        ]},
        {path:'/registry',component:UserRegistry}
    ]
});
//将路由对象对外暴露
export default router